package background
{
    import flash.display.Sprite;
    import flash.events.Event;

    public class Snowflakes extends Sprite
    {
        public function Snowflakes()
        {
            addEventListener(Event.ENTER_FRAME, onEnterFrame);
        }
        
        public function init(_width : int, _height : int) : void
        {
            createSnowflakes(_width, _height);
        }
        
        private function createSnowflakes(_width : int, _height : int) : void
        {
            while(numChildren > 0)
                removeChildAt(0);
                
            for(var i : int = 0; i < 200; i++)
            {
                var snowflake : Snowflake = new Snowflake(_width, _height);
                addChild(snowflake);
            }
        }
        
        private function onEnterFrame(event : Event) : void
        {
        }
    }
}